package com.wangtao.firstapp.adapters;

import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;

import com.squareup.picasso.Picasso;
import com.wangtao.firstapp.R;
import com.wangtao.firstapp.modles.CategoryPictures;

/**
 * 晒单界面下分类标签的RecyclerView的适配器(废弃)
 * Created by lanouhn on 16/8/26.
 */
public class CategoryRVAdapter extends RecyclerView.Adapter<CategoryRVAdapter.ViewHolder> {
    private Context context;
    private CategoryPictures pictures;

    public CategoryRVAdapter(Context context, CategoryPictures pictures) {
        this.context = context;
        this.pictures = pictures;
    }

    @Override
    public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
        View view = LayoutInflater.from(context).inflate(R.layout.item_mygridview1, null);
        ViewHolder holder = new ViewHolder(view);
        return holder;
    }

    @Override
    public void onBindViewHolder(ViewHolder holder, int position) {
        // Picasso.with(context).load(pictures.getData().getCategory_list().get(position).getPic()).into(holder.iv_item_mygridview1);
    }

    @Override
    public int getItemCount() {
        return pictures.getData().getCategory_list().size();
    }


    public class ViewHolder extends RecyclerView.ViewHolder {
        //private ImageView iv_item_mygridview1;

        public ViewHolder(View itemView) {
            super(itemView);
            //   iv_item_mygridview1 = (ImageView) itemView.findViewById(R.id.iv_item_mygridview1);

        }
    }
}